@blade-hq/agent-kit 0.5.23 → 0.5.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -182,6 +182,7 @@ interface SessionState extends ClientAwareState {
182
182
  loading: boolean;
183
183
  modes: Record<string, SessionMode>;
184
184
  rewindDrafts: Record<string, string>;
185
+ errorMessages: Record<string, string>;
185
186
  /** Session IDs that were just created and haven't had their first history load yet */
186
187
  _freshSessions: Set<string>;
187
188
  fetchSessions: () => Promise<void>;
@@ -203,6 +204,8 @@ interface SessionState extends ClientAwareState {
203
204
  */
204
205
  patchSession: (sessionId: string, patch: Partial<SessionInfo>) => void;
205
206
  pinSession: (sessionId: string, pinned: boolean) => Promise<void>;
207
+ setErrorMessage: (sessionId: string, message: string) => void;
208
+ clearErrorMessage: (sessionId: string) => void;
206
209
  setRewindDraft: (sessionId: string, text: string | null) => void;
207
210
  setMode: (sessionId: string, mode: SessionMode) => void;
208
211
  togglePlanningMode: (sessionId: string) => void;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useSessionStore
3
- } from "./chunk-B4RZNR3L.js";
3
+ } from "./chunk-DTDZFQRY.js";
4
4
 
5
5
  // src/react/hooks/use-session.ts
6
6
  function useSession() {
@@ -27,4 +27,4 @@ function useSession() {
27
27
  export {
28
28
  useSession
29
29
  };
30
- //# sourceMappingURL=chunk-SLTENCW7.js.map
30
+ //# sourceMappingURL=chunk-63IWZ3AO.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getCodeLanguageFromFilename,
9
9
  parseAskUserQuestion,
10
10
  useHighlightedCodeHtml
11
- } from "./chunk-LI3WURWU.js";
11
+ } from "./chunk-KW66QITV.js";
12
12
  import {
13
13
  Collapsible,
14
14
  CollapsibleContent,
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-H62LH2AG.js";
17
17
  import {
18
18
  resolveSessionFilePreviewTarget
19
- } from "./chunk-NWKF2VEC.js";
19
+ } from "./chunk-QKSZPJQX.js";
20
20
  import {
21
21
  apiFetchResponse,
22
22
  buildMessageContent,
@@ -60,7 +60,7 @@ import {
60
60
  useUiBridgeStore,
61
61
  useUiStore,
62
62
  writeFile
63
- } from "./chunk-B4RZNR3L.js";
63
+ } from "./chunk-DTDZFQRY.js";
64
64
  import {
65
65
  registerBridgeIframe,
66
66
  tapBridgeEvent
@@ -79,6 +79,7 @@ import {
79
79
  } from "./chunk-PZ5AY32C.js";
80
80
 
81
81
  // src/react/components/chat/ChatView.tsx
82
+ import { CircleAlert } from "lucide-react";
82
83
  import { Eye } from "lucide-react";
83
84
  import { useCallback as useCallback13, useMemo as useMemo18 } from "react";
84
85
 
@@ -8334,6 +8335,7 @@ function ChatView({
8334
8335
  stop
8335
8336
  } = useChat(sessionId);
8336
8337
  const session = useSessionStore((s) => s.sessions.find((ss) => ss.id === sessionId));
8338
+ const errorMessage = useSessionStore((s) => s.errorMessages[sessionId]);
8337
8339
  const mode = useSessionStore((s) => s.modes[sessionId] ?? "executing");
8338
8340
  const toggleMode = useCallback13(
8339
8341
  () => useSessionStore.getState().togglePlanningMode(sessionId),
@@ -8362,6 +8364,10 @@ function ChatView({
8362
8364
  "\u4F60\u6B63\u5728\u67E5\u770B\u5206\u4EAB\u7684\u4F1A\u8BDD\uFF08\u53EA\u8BFB\uFF09"
8363
8365
  ] }),
8364
8366
  !isViewer && /* @__PURE__ */ jsx36(ConnectionBanner, {}),
8367
+ errorMessage && /* @__PURE__ */ jsxs31("div", { className: "flex items-start gap-2 border-b border-red-200 bg-red-50 px-4 py-3 text-sm text-red-800 dark:border-red-800/30 dark:bg-red-950/30 dark:text-red-300", children: [
8368
+ /* @__PURE__ */ jsx36(CircleAlert, { size: 16, className: "mt-0.5 shrink-0" }),
8369
+ /* @__PURE__ */ jsx36("span", { children: errorMessage })
8370
+ ] }),
8365
8371
  /* @__PURE__ */ jsx36(
8366
8372
  MessageList,
8367
8373
  {
@@ -8450,4 +8456,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
8450
8456
  * Licensed under the MIT License. See License.txt in the project root for license information.
8451
8457
  *--------------------------------------------------------------------------------------------*)
8452
8458
  */
8453
- //# sourceMappingURL=chunk-PRWPDK6Z.js.map
8459
+ //# sourceMappingURL=chunk-7FGJNW56.js.map